home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / misc / dspice0s / getlin.c < prev    next >
C/C++ Source or Header  |  1992-11-21  |  3KB  |  105 lines

  1. /* getlin.f -- translated by f2c (version of 3 February 1990  3:36:42).
  2.    You must link the resulting object file with the libraries:
  3.     -lF77 -lI77 -lm -lc   (in that order)
  4. */
  5.  
  6. #include "f2c.h"
  7.  
  8. /* Common Block Declarations */
  9.  
  10. struct {
  11.     doublereal achar, afield[15], oldlin[15];
  12.     integer kntrc, kntlim;
  13. } line_;
  14.  
  15. #define line_1 line_
  16.  
  17. struct {
  18.     integer iprnta, iprntl, iprntm, iprntn, iprnto, limtim, limpts, lvlcod, 
  19.         lvltim, itl1, itl2, itl3, itl4, itl5, itl6, igoof, nogo, keof;
  20. } flags_;
  21.  
  22. #define flags_1 flags_
  23.  
  24. struct {
  25.     doublereal omega, time, delta, delold[7], ag[7], vt, xni, egfet, xmu, 
  26.         sfactr;
  27.     integer mode, modedc, icalc, initf, method, iord, maxord, noncon, iterno, 
  28.         itemno, nosolv, modac, ipiv, ivmflg, ipostp, iscrch, iofile;
  29. } status_;
  30.  
  31. #define status_1 status_
  32.  
  33. /* Table of constant values */
  34.  
  35. static integer c__15 = 15;
  36. static integer c__1 = 1;
  37.  
  38. /*<       subroutine getlin >*/
  39. /* Subroutine */ int getlin_()
  40. {
  41.     /* Format strings */
  42.     static char fmt_6[] = "(10a8)";
  43.  
  44.     /* System generated locals */
  45.     integer i_1;
  46.  
  47.     /* Builtin functions */
  48.     integer s_rsfe(), do_fio(), e_rsfe();
  49.  
  50.     /* Local variables */
  51.     extern /* Subroutine */ int copy8_();
  52.     static integer i;
  53.     extern /* Subroutine */ int ushift_();
  54.  
  55.     /* Fortran I/O blocks */
  56.     static cilist io__1 = { 0, 5, 1, fmt_6, 0 };
  57.  
  58.  
  59. /*<       implicit double precision (a-h,o-z) >*/
  60.  
  61. /*     this routine reads the next line of input into the array afield. */
  62.  
  63. /* if end-of-file is found, the variable keof is set to 1. */
  64.  
  65. /* spice version 2g.6  sccsid=line 3/15/83 */
  66. /*<       common /line/ achar,afield(15),oldlin(15),kntrc,kntlim >*/
  67. /* spice version 2g.6  sccsid=flags 3/15/83 */
  68. /*<       common /flags/ iprnta,iprntl,iprntm,iprntn,iprnto,limtim,limpts, >*/
  69. /*<      1   lvlcod,lvltim,itl1,itl2,itl3,itl4,itl5,itl6,igoof,nogo,keof >*/
  70. /* spice version 2g.6  sccsid=status 3/15/83 */
  71. /*<       common /status/ omega,time,delta,delold(7),ag(7),vt,xni,egfet, >*/
  72. /*<      1   xmu,sfactr,mode,modedc,icalc,initf,method,iord,maxord,noncon, >*/
  73. /*<      2   iterno,itemno,nosolv,modac,ipiv,ivmflg,ipostp,iscrch,iofile >*/
  74.  
  75.  
  76. /*<       call copy8(afield,oldlin,15) >*/
  77.     copy8_(line_1.afield, line_1.oldlin, &c__15);
  78. /*<       read(5,6,end=10) (afield(i),i=1,10) >*/
  79.     i_1 = s_rsfe(&io__1);
  80.     if (i_1 != 0) {
  81.     goto L10;
  82.     }
  83.     for (i = 1; i <= 10; ++i) {
  84.     i_1 = do_fio(&c__1, (char *)&line_1.afield[i - 1], (ftnlen)sizeof(
  85.         doublereal));
  86.     if (i_1 != 0) {
  87.         goto L10;
  88.     }
  89.     }
  90.     i_1 = e_rsfe();
  91. /*<       go to 100 >*/
  92.     goto L100;
  93. /*<     6 format(10a8) >*/
  94. /*<    10 keof=1 >*/
  95. L10:
  96.     flags_1.keof = 1;
  97. /*<   100 call ushift(afield) >*/
  98. L100:
  99.     ushift_(line_1.afield);
  100. /*<       return >*/
  101.     return 0;
  102. /*<       end >*/
  103. } /* getlin_ */
  104.  
  105.